// 第一种、直接赋值默认值
// Person
class Person {
    name: string = ''
    age: number = 0
    eating() {
        console.log('eating');
    }
}
// 此时stuadent和techar都需要name\age\eating方法
class student  extends Person {
    id: number = 0
    stu() {
        console.log('stu');
    }
}
class techar extends Person {
    title: string = ''
    tec() {
        console.log('tec');
    }
}
const p = new student()
console.log(p);

export{}